Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
10 crawler(s) on-line.
 43 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Rob:  43 mins ago
 matthey:  1 hr 5 mins ago
 agami:  2 hrs 1 min ago
 DiscreetFX:  3 hrs 52 mins ago
 NutsAboutAmiga:  5 hrs 5 mins ago
 OneTimer1:  5 hrs 58 mins ago
 amigakit:  6 hrs 58 mins ago
 BigD:  7 hrs 3 mins ago
 zipper:  9 hrs 20 mins ago
 Frank:  9 hrs 34 mins ago

/  Forum Index
   /  Amiga Development
      /  Building Curses based program
Register To Post

Goto page ( 1 | 2 Next Page )
PosterThread
thegman 
Building Curses based program
Posted on 1-Mar-2009 18:18:09
#1 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

Hi all, I'm trying to build a 5250 client under os4.1 on a Sam440, which uses Curses or NCurses. I downloaded PDCurses from OS4Depot and I've put it into

OS41:SDK/gcc/lib/gcc/ppc-amigaos/4.2.4/clib2/lib/libncurses.a

and also

OS41:SDK/gcc/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libncurses.a

But when I run the ./configure script, it does not seem to be found.

I expect this is a real rookie mistake, but I've never compiled anything beyond "hello world" on an Amiga, so can anyone tell me where I should put these libraries so that Make/GCC can find them?

Also, I see the flag -m68020 popping up during building, does this mean that it's cross compiling to 68k and not native PPC?

Cheers

Garry

 Status: Offline
Profile     Report this post  
spotUP 
Re: Building Curses based program
Posted on 1-Mar-2009 18:29:44
#2 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@thegman

pdcurses uses sdl.
so add the common sdl libraries to the configure scripts after -lncurses...
liked this..
there's usually two places where -lncurses will be found in the configure script,
add this to both:

-lncurses -lsdl_image -lpng -lz ljpeg -ltiff -lsdlmain -lsdl -lauto etc etc

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
thegman 
Re: Building Curses based program
Posted on 1-Mar-2009 18:39:00
#3 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

OK, will do, should I be using newlib or clib2 stuff?

Thanks

Garry

Last edited by thegman on 01-Mar-2009 at 06:39 PM.

 Status: Offline
Profile     Report this post  
salass00 
Re: Building Curses based program
Posted on 1-Mar-2009 18:52:08
#4 ]
Elite Member
Joined: 31-Oct-2003
Posts: 2707
From: Finland

@thegman

Quote:

Hi all, I'm trying to build a 5250 client under os4.1 on a Sam440, which uses Curses or NCurses. I downloaded PDCurses from OS4Depot and I've put it into

OS41:SDK/gcc/lib/gcc/ppc-amigaos/4.2.4/clib2/lib/libncurses.a

and also

OS41:SDK/gcc/lib/gcc/ppc-amigaos/4.2.4/newlib/lib/libncurses.a


Whoever told you to put them in these places should be shot.

The correct places for third party static libraries are SDK:Local/newlib/lib for newlib and SDK:Local/clib2/lib for clib2.

I assume you also installed header files into SDK:Local/common/include?

In any case to be able to tell what is actually going wrong you really need to look in your config.log file (this is generated each time when you run the configure script). Open it in Notepad and do a search on "-lncurses" and you should be able to find the spot quite easily.

 Status: Offline
Profile     Report this post  
thegman 
Re: Building Curses based program
Posted on 1-Mar-2009 21:39:13
#5 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@salass00

It was I who tried to put the libs in there... Just trying to find anywhere it would work really. Anyway, I've put the files where you suggest, and it still was not able to find the libs. I'm trying a few other things right now to try to make it build, so I expect I'll return with more questions...

Thanks a lot for the assistance, I'll require more though I think!

Garry

 Status: Offline
Profile     Report this post  
thegman 
Re: Building Curses based program
Posted on 5-Mar-2009 11:32:00
#6 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

Hello all,
I'm still trying to get the curses program (tn5250) to work, I've got somewhat further, but ran into a bit of a brick wall. I've managed to link a lot of things like SDL and PDCurses and about 99% of the source appears to have compiled successfuly, but I have this problem when I compile one of the source files:

/Work/tn5250-0.17.4/curses> gcc -g -O2 -o tn5250 tn5250-cursesterm.o tn5250-tn5250.o ../lib5250/.libs/lib5250.a -lncurses -lsdl -lsdlmain
/SDK/local/newlib/lib/libncurses.a(initscr.o): In function `Xinitscr':
initscr.c:(.text+0x306): undefined reference to `__iob'
initscr.c:(.text+0x30e): undefined reference to `__iob'
initscr.c:(.text+0x34e): undefined reference to `__iob'
initscr.c:(.text+0x356): undefined reference to `__iob'
initscr.c:(.text+0x376): undefined reference to `__iob'
/SDK/local/newlib/lib/libncurses.a(initscr.o):initscr.c:(.text+0x37e): more undefined references to `__iob' follow

As far as I can tell "__iob" is referenced by initscr in PDCurses, I downloaded PDCurses from OS4Depot and did not build it myself, can anyone suggest how to resolve the problem?

I'd really love to get this program working as it's one of the few things stopping me using my Amiga for most of my day-to-day tasks.

Thanks a lot

Garry

 Status: Offline
Profile     Report this post  
spotUP 
Re: Building Curses based program
Posted on 5-Mar-2009 12:50:45
#7 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@thegman

when you get undefined references to __iob it means you are mixing newlib and clib2 object files.
are you using the latest sdk?
are you compiling for newlib or clib2?

make sure you copied the pdcurses libs to the right place too, you might have mixed them up.

edit: ah... nice piece of sw it seems.



i guess it doesn't support ssh?

Last edited by spotUP on 05-Mar-2009 at 12:55 PM.
Last edited by spotUP on 05-Mar-2009 at 12:54 PM.
Last edited by spotUP on 05-Mar-2009 at 12:52 PM.
Last edited by spotUP on 05-Mar-2009 at 12:51 PM.

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
thegman 
Re: Building Curses based program
Posted on 5-Mar-2009 12:54:31
#8 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

I'm using the SDK as taken from Hyperion's website about a week ago, I don't know if I'm using newlib or clib2, how can I tell? I'm running the ./configure script and make almost unchanged, so I'm not sure what it defaults to.

If I compile for say, newlib, do I need to make sure that PDCurses and SDL are also newlib, and vice versa?

Thanks

Garry

 Status: Offline
Profile     Report this post  
spotUP 
Re: Building Curses based program
Posted on 5-Mar-2009 13:02:10
#9 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@thegman

ok, as you are using the latest sdk, it defaults to newlib when you don't specify anything.
so you are compiling for newlib.

that means you have to link with the newlib versions of the libs.
this should be done automatically, but just in case,
you could add /this line to the makefiles CFLAGS=
-I/SDK/Local/newlib/include/ -L/SDK/Local/newlib/lib/

and recompile. i also suggest you reinstall pdcurses, it seems you did something wrong when installing it.
i just checked my pdcurses archive on os4depot, i never made a clib2 version, so make sure you have these libs in the correct place, i.e:

SDK:Local/newlib/lib/libcurses.a
SDK:Local/newlib/lib/libncurses.a
SDK:Local/newlib/lib/libpdcurses.a

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
spotUP 
Re: Building Curses based program
Posted on 5-Mar-2009 13:06:51
#10 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@spotUP

also add -mcrt=newlib to the makefile's CFLAGS
and do a clean build.

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
thegman 
Re: Building Curses based program
Posted on 5-Mar-2009 13:28:28
#11 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

OK, thanks for the help, unfortunately I had a nasty crash just now and appear to have lost most of the files in the tn5250 folder, along with my changes so far, so I'm going have to go from scratch, so will be a while before I report back.

Just one more thing, is there any way of getting syslog for the Amiga, I had to comment out lots of references, and it would be easier just to somehow link to a syslog fake.

Cheers

Garry

 Status: Offline
Profile     Report this post  
thegman 
Re: Building Curses based program
Posted on 5-Mar-2009 13:32:45
#12 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

Incidentally, yes, tn5250 is a lovely program, and let's me access another one of my favourite computers, and I'm afraid it does not support SSH. They support 5250 over SSL but I've disabled that for the moment, to make things easier. You can also telnet into an AS/400 but it's really ugly and nowhere near as nice as 5250 protocol.

Garry

 Status: Offline
Profile     Report this post  
thegman 
Thanks to SpotUP, Was: Building Curses based program
Posted on 5-Mar-2009 19:46:48
#13 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

Hi there, thanks to your advice, finally got it working!



The function keys are not working at all, which is a problem for this type of system, but I'm guessing that's fixable, also AS/400 needs 24 F keys, not the 19 on my Mac keyboard, but again, probably fixable.

Thanks again for your help.

Garry

 Status: Offline
Profile     Report this post  
corto 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 5-Mar-2009 20:44:40
#14 ]
Regular Member
Joined: 24-Apr-2004
Posts: 342
From: Grenoble (France)

Hi ! As the topic is about (n)curses, I just would like to inform that at a time, just before pdcurses was available, I ported nfrotz, that is a adventure game engine. It uses ncurses, so I wrote a lib that offers the ncurses API but uses Intuition. It opens its own window instead of using the console window.
I don't know if this lib would be useful. The best would be to have a classic behaviourof ncurses ... even if I think this lib is crappy and a bit prehistoric. It helps in some ports.

At the moment, I don't know if such a lib can use the console window. I didn't know how to communicate with the console.

 Status: Offline
Profile     Report this post  
spotUP 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 6-Mar-2009 0:54:50
#15 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@thegman

hey, great!

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
thegman 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 6-Mar-2009 17:24:12
#16 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

Hello, thanks again for your help in getting tn5250 to work, unfortunately I need to call on you once again for some help in getting it work correctly. The main problem is basically the function keys,cursor keys and backspace do not work.

Return works, and normal text work, but without function keys, cursors and backspace, it's not usable.

Do you think this could be a PDCurses issue, or more related to keyboard handling on the Amiga, maybe the window itself is accepting the keypress and it's not getting as far as PDCurses? Do you know of any good keyboard watchers or utilities to help debug this?

Thanks

Garry

Last edited by thegman on 06-Mar-2009 at 05:25 PM.

 Status: Offline
Profile     Report this post  
spotUP 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 8-Mar-2009 5:07:10
#17 ]
Elite Member
Joined: 19-Aug-2003
Posts: 2896
From: Up Rough Demo Squad

@thegman

sorry, this is beyond me i am afraid.
ask on utilitbase perhaps?
or ask the pdcurses authors?
or both! :)

_________________
AOS4 Betatester, Peg2, G4@1ghz, Radeon 9250 256mb, 1gb RAM.

http://www.asciiarena.com
http://www.uprough.net

 Status: Offline
Profile     Report this post  
thegman 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 8-Mar-2009 15:41:28
#18 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@spotUP

OK, will do, you've been a great help though!

Thanks

Garry

 Status: Offline
Profile     Report this post  
corto 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 8-Mar-2009 17:05:45
#19 ]
Regular Member
Joined: 24-Apr-2004
Posts: 342
From: Grenoble (France)

@thegman

I could check to see if I can add that in my curses library. Maybe it will work and the advantage is it does not require SDL to run a text base program.

 Status: Offline
Profile     Report this post  
thegman 
Re: Thanks to SpotUP, Was: Building Curses based program
Posted on 8-Mar-2009 17:25:47
#20 ]
Member
Joined: 11-Dec-2008
Posts: 49
From: Unknown

@corto

I'd be really interested to see that, I've no objection to SDL at all, but if your library behaves differently and maybe cursors/backspace etc. is more likely to work, that would be great.

I could send you the source to build tn5250 if you want to try it out yourself?

Thanks

Garry

 Status: Offline
Profile     Report this post  
Goto page ( 1 | 2 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle